package com.rightsidetech.mall.mapper;

import com.rightsidetech.mall.dto.request.IntegralPageReq;
import com.rightsidetech.mall.dto.request.storeApp.StoreIntegralReq;
import com.rightsidetech.mall.dto.response.IntegralDetailResp;
import com.rightsidetech.mall.dto.response.IntegralPageResp;
import com.rightsidetech.mall.dto.response.storeApp.StoreIntegralResp;
import com.rightsidetech.mall.entity.MallIntegralCommodity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MallIntegralCommodityMapper {
    int deleteByPrimaryKey(Long id);

    int insert(MallIntegralCommodity record);

    int insertSelective(MallIntegralCommodity record);

    MallIntegralCommodity selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(MallIntegralCommodity record);

    int updateByPrimaryKey(MallIntegralCommodity record);

    Long selectCountByBaseIdAndSpecs(@Param("baseInfoId") Long baseInfoId,@Param("specs") String specs);

    List<IntegralPageResp> selectPageList(IntegralPageReq req);

    Long selectSortOne();

    List<StoreIntegralResp> selectStorePage(StoreIntegralReq req);

    List<String> selectByBaseInfoId(@Param("baseInfoId") Long baseInfoId);

    IntegralDetailResp selectDetail(Long id);

    int updateById(MallIntegralCommodity commodity);

    int updateSortById(@Param("id") Long id,@Param("sort") Long sort);

    List<MallIntegralCommodity> selectByIds(List<Long> list);
}